package com.pet.pet04item.service;

import com.pet.mapper.BrowerLogMapper;
import com.pet.pojo.BrowerLog;
import com.pet.service.BrowerLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class BrowerLogServiceImpl implements BrowerLogService {
    @Autowired
    private BrowerLogMapper browerLogMapper;

    @Transactional
    @Override
    public void setLog(BrowerLog browerLog) {
        browerLogMapper.insert(browerLog);
    }

    @Override
    public List<BrowerLog> getLogs() {
        List<BrowerLog> logs = browerLogMapper.getLogs();
        return logs;
    }
}
